home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgetlist.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.9 KB  |  76 lines

  1. // $Id: gadgetlist.h 1.3 1998/01/13 20:02:45 dlorre Exp dlorre $
  2. #ifndef CLASS_GADGETLIST_H
  3. #define CLASS_GADGETLIST_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #ifndef GRAPHICS_TEXT_H
  10. #include "graphics/text.h"
  11. #endif
  12.  
  13. #ifndef INTUITION_INTUITION_H
  14. #include "intuition/intuition.h"
  15. #endif
  16.  
  17. #ifndef LIBRARIES_GADTOOLS_H
  18. struct NewGadget ;
  19. #endif
  20.  
  21. #ifndef CLASS_RECTANGLE_H
  22. #include "rectangle.h"
  23. #endif
  24.  
  25. class window ;
  26. class gadget ;
  27.  
  28. // ========================================================================
  29. // ==========================  GADGETLIST CLASS ===========================
  30. // ========================================================================
  31.  
  32. class gadgetlist : public rectangle
  33. {
  34. friend class gadget ;
  35.     gadget  **gtab ;
  36.     WORD    count ;         // How many gadgets are currently here ?
  37.     WORD    max ;           // How many gadgets max available ?
  38.  
  39.     IntuiText   *it ;
  40.     TTextAttr   PlainAttr ;
  41.     TTextAttr   BoldAttr ;
  42.     TextFont    *bfont ;
  43. public:
  44.     UBYTE       gpen ;
  45.     window      *win ;      // owner of the gadgetlist
  46.     NewGadget   *ng ;
  47.     Gadget      *glist ;
  48.     Gadget      *gad ;
  49.     Window      *wp ;
  50.  
  51.     long        fontheight ;
  52.     BOOL        initok ;
  53.  
  54.     gadgetlist(window *w, short gmax) ;      // the creator
  55.     ~gadgetlist() ;                         // the destructor
  56.     void processgadget(LONG id,
  57.                        unsigned long,
  58.                        unsigned short) ;    // events processing
  59.     void addgadgets() ;                     // add glist to window
  60.     void updategadgets() ;                  // window opened with glist
  61.     void setfont(TTextAttr *) ;
  62.     void setdefault(BOOL bolden) ;
  63.     long ltext(const char *) ;
  64.     long lmax(const char **) ;
  65.     long lmax(const char *, ...) ;
  66.     void setgpen(UBYTE g) { gpen=g ;}
  67.     void selectgadget(LONG id, BOOL shifted) ;
  68.     void parsegadgets(USHORT code) ;
  69.     gadget *getgadget(LONG id) ;
  70.     WORD getcount() { return count ; }
  71. } ;
  72.  
  73.  
  74.  
  75. #endif
  76.